<?php// no direct accessdefined('_JEXEC') or die('Restricted access');
$user =& JFactory::getUser();  $userid = $user->get('id');  $query = "SELECT pointsFROM jos_alpha_userpointsWHEREuserid = " . $userid ;$db =& JFactory::getDBO();$db->setQuery( $query );$row = $db->loadObject();echo $row->points;